
package se.sll.service.catalogue.gui.api.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.codehaus.jackson.annotate.JsonAnyGetter;
import org.codehaus.jackson.annotate.JsonAnySetter;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.map.annotate.JsonSerialize;


/**
 * A single product
 * 
 */
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
    "product",
    "capacities",
    "contractedProduct",
    "comment",
    "contractedPrice"
})
public class ProductReference {

    /**
     * A single product
     * 
     */
    @JsonProperty("product")
    @Valid
    private Product_ product;
    /**
     * a collection of capacities
     * 
     */
    @JsonProperty("capacities")
    @Valid
    private List<Capacity> capacities = new ArrayList<Capacity>();
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("contractedProduct")
    @NotNull
    private Boolean contractedProduct;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("comment")
    @NotNull
    private String comment;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("contractedPrice")
    @NotNull
    private String contractedPrice;
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    /**
     * A single product
     * 
     * @return
     *     The product
     */
    @JsonProperty("product")
    public Product_ getProduct() {
        return product;
    }

    /**
     * A single product
     * 
     * @param product
     *     The product
     */
    @JsonProperty("product")
    public void setProduct(Product_ product) {
        this.product = product;
    }

    public ProductReference withProduct(Product_ product) {
        this.product = product;
        return this;
    }

    /**
     * a collection of capacities
     * 
     * @return
     *     The capacities
     */
    @JsonProperty("capacities")
    public List<Capacity> getCapacities() {
        return capacities;
    }

    /**
     * a collection of capacities
     * 
     * @param capacities
     *     The capacities
     */
    @JsonProperty("capacities")
    public void setCapacities(List<Capacity> capacities) {
        this.capacities = capacities;
    }

    public ProductReference withCapacities(List<Capacity> capacities) {
        this.capacities = capacities;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The contractedProduct
     */
    @JsonProperty("contractedProduct")
    public Boolean getContractedProduct() {
        return contractedProduct;
    }

    /**
     * 
     * (Required)
     * 
     * @param contractedProduct
     *     The contractedProduct
     */
    @JsonProperty("contractedProduct")
    public void setContractedProduct(Boolean contractedProduct) {
        this.contractedProduct = contractedProduct;
    }

    public ProductReference withContractedProduct(Boolean contractedProduct) {
        this.contractedProduct = contractedProduct;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The comment
     */
    @JsonProperty("comment")
    public String getComment() {
        return comment;
    }

    /**
     * 
     * (Required)
     * 
     * @param comment
     *     The comment
     */
    @JsonProperty("comment")
    public void setComment(String comment) {
        this.comment = comment;
    }

    public ProductReference withComment(String comment) {
        this.comment = comment;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The contractedPrice
     */
    @JsonProperty("contractedPrice")
    public String getContractedPrice() {
        return contractedPrice;
    }

    /**
     * 
     * (Required)
     * 
     * @param contractedPrice
     *     The contractedPrice
     */
    @JsonProperty("contractedPrice")
    public void setContractedPrice(String contractedPrice) {
        this.contractedPrice = contractedPrice;
    }

    public ProductReference withContractedPrice(String contractedPrice) {
        this.contractedPrice = contractedPrice;
        return this;
    }

    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    public ProductReference withAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
        return this;
    }

}
